{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "闰年判断"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def check_the_year_is():\n",
    "    year: int = 0\n",
    "    year = int(input(\"input a year\"))\n",
    "    if year % 4 == 0 and year % 100 != 0 or year % 400 == 0:\n",
    "        print(\"it is a leap year\")\n",
    "    else:\n",
    "        print(\"it is not a leap year\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "it is not a leap year\n"
     ]
    }
   ],
   "source": [
    "check_the_year_is()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "science39",
   "language": "python",
   "name": "science39"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
